#ifndef ARM_CONTROL__ARM_ACTION_BASE_HPP_
#define ARM_CONTROL__ARM_ACTION_BASE_HPP_

#include <memory>
#include "rclcpp/rclcpp.hpp"
#include "rclcpp_action/rclcpp_action.hpp"
#include "arm_control/action/arm.hpp"

namespace arm_control
{

// 机械臂动作基类
class ArmActionBase
{
public:
  using ARM = arm_control::action::ARM;
  using GoalHandleARM = rclcpp_action::ServerGoalHandle<ARM>;

  explicit ArmActionBase(rclcpp::Logger logger) : logger_(logger) {}
  virtual ~ArmActionBase() = default;

  // 纯虚函数，子类必须实现
  virtual void execute(
    const std::shared_ptr<GoalHandleARM> goal_handle,
    std::shared_ptr<ARM::Feedback> feedback,
    std::shared_ptr<ARM::Result> result) = 0;

protected:
  rclcpp::Logger logger_;
};

} // namespace arm_control

#endif // ARM_CONTROL__ARM_ACTION_BASE_HPP_

